function updateTime() {
    const now = new Date();

    const year = now.getFullYear();
    const month = now.getMonth() + 1;
    const day = now.getDate();

    const weekDays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
    const weekDay = weekDays[now.getDay()];

    const dateString = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
    const timeString = `${dateString} ${weekDay}`;
    document.getElementById('currentTime').textContent = timeString;
  }

  setInterval(updateTime, 1000);
  updateTime();
